<script setup>
// 消息详情
const goMessageDetail = () => {
  console.log('goMessageDetail')
  uni.navigateTo({
    url: '/subPackage/my/user/messageDetail'
  })
}
</script>

<template>
  <view class="message-page">
    <view class="list">
      <view class="item" v-for="item in 10" @click="goMessageDetail(item)">
        <view class="icon-box">
          <up-badge :type="'error'" max="99" :value="1" :absolute="true" :offset="[0, 0]"></up-badge>
          <image style="width: 108rpx;height: 108rpx;" src="/static/images/my/message/icon1.png" mode="scaleToFill" />
        </view>
        <view class="info-box">
          <view class="top">
            <view class="title">系统通知</view>
            <view class="time">2024-08-12 16:18</view>
          </view>
          <view class="cnt up-line-1">系统通知内容系统通知内容系统通知内容内容13231232131231231....</view>
        </view>
      </view>
    </view>
  </view>
</template>

<style lang="scss" scoped>
.message-page {
  padding-bottom: 140rpx;

  & .list {
    & .item {
      position: relative;
      padding: 32rpx;
      display: flex;
      align-items: center;

      &:not(:last-child)::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        background: #f5f5f5;
        width: 684rpx;
        height: 0rpx;
        border: 2rpx solid;
        opacity: 0.5;
        border-image: linear-gradient(270deg, rgba(217, 217, 217, 0), rgba(217, 217, 217, 1), rgba(217, 217, 217, 0)) 2 2;
      }

      & .icon-box {
        position: relative;
      }

      & .info-box {
        margin-left: 24rpx;

        & .top {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 8rpx;

          width: 550rpx;

          & .title {
            font-weight: 500;
            font-size: 28rpx;
            color: #303133;
          }

          & .time {
            font-weight: 400;
            font-size: 24rpx;
            color: #838385;
          }
        }

        & .cnt {
          width: 506rpx;
          font-weight: 400;
          font-size: 24rpx;
          color: #838385;
        }
      }
    }
  }
}
</style>